package com.android.allwinner.newaw360.utils;

import android.util.Log;

public final class LogUtil {
    private static final String TAG = "aw360--->";
    public static final int LOG_INFO = 0;
    public static final int LOG_DEBUG = 1;
    public static final int LOG_WARNING = 2;
    public static final int LOG_ERROR = 3;
    private static boolean DEBUG = true;
    private static int LOG_LEVEL = 0;

    public static void i(String tag, String info) {
        if (DEBUG) {
            if (LOG_LEVEL <= LOG_INFO) {
                tag = TAG + tag;
                Log.i(tag, "---------" + info);
            }
        }

    }

    public static void d(String tag, String debug) {
        if (DEBUG) {
            if (LOG_LEVEL <= LOG_DEBUG) {
                tag = TAG + tag;
                Log.d(tag, "---------" + debug);
            }
        }

    }

    public static void w(String tag, String warning) {
        if (LOG_LEVEL <= LOG_WARNING) {
            tag = TAG + tag;
            Log.w(tag, "---------" + warning);
        }

    }

    public static void e(String tag, String error) {
        if (LOG_LEVEL <= LOG_ERROR) {
            tag = TAG + tag;
            Log.e(tag, "---------" + error);
        }

    }
}
